-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Rework the protobuf ecosystem #28321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
I definitely support this. One of our older tickets has plenty of details regarding the challenges for some of our older ports: https://trac.macports.org/ticket/57117 But as long as we take our time, and work through the details, this would be a nice improvement. I'm going to try and pull these changes down over the next few days, and review how everything fits together. And finally, thank you so much for taking the initiative on this! |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
5cc2a3b
to
9c33cec
Compare
4fd3cf1
to
3142585
Compare
This comment was marked as outdated.
This comment was marked as outdated.
50d3434
to
ecd852f
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
@suhailskhan @mascguy Maybe follow some consistent naming scheme for protobuf? Current choices appear quite confusing, IMO. |
Protobuf’s naming and versioning is quite confusing in general (uniquely so), MacPorts aside. Before delving into that, allow me to recap where things currently stand with the core (i.e. C++) Protobuf ports, naming and versioning wise:
The first two among these are installed in Now, here is what the PR is doing in its current state:
As for the reasoning and motivation behind the new way of handling the naming and versioning of
So this may make you wonder, why not move I did this with On the other hand, I am still open to making |
@suhailskhan Thank you for a detailed explanation. My concern was the following: without knowing all this, it may appear that protobuf29 stands for 2.9 (like python27 stands for 2.7), and thus is older than protobuf3, while in fact the reverse is true. It is also confusing that in some cases -cpp is retained, in other dropped, while both are identically representing protobuf C++. |
I had this exact concern too, though when considering how people will discover the port, through means such as
This again comes back to those two older ports being legacy. If we go ahead with keeping the names unchanged, we would just need to endure this until their eventual deletion, which would hopefully be very soon. But if we know that for some reason they will need to stick around for relatively long, then perhaps a rename right now is justifiable. I am not sure I can make a strong call one way or another as I don’t have enough insight, but from what limited insight I do have, they would probably not need to stay for too much more time. Another thing that can be done irrespective of this, and that I had been considering to do, is add a |
What I probably do have enough insight to say is that |
Just leaving this here for the reference: protobuf-c *might* need
legacy-support wrappers with libstdc++.
When building knot with dnstap enabled, this is what I see:
```
---> Building knot
Executing: cd
"/opt/local/var/macports/build/_opt_local_ppcports_net_knot/knot/work/knot-3.4.6"
&& /usr/bin/make -j6 -w all
make: Entering directory
`/opt/local/var/macports/build/_opt_local_ppcports_net_knot/knot/work/knot-3.4.6'
Making all in src
make[1]: Entering directory
`/opt/local/var/macports/build/_opt_local_ppcports_net_knot/knot/work/knot-3.4.6/src'
/opt/local/bin/protoc-c --c_out=. -I. contrib/dnstap/dnstap.proto
/opt/local/bin/protoc-c --c_out=. -I. contrib/dnstap/dnstap.proto
NOTE: Compilation of scanner.c can take several minutes!
protoc-c(21660) malloc: *** error for object 0xa04da754: pointer being
freed was not allocated
*** set a breakpoint in malloc_error_break to debug
protoc-c(21659) malloc: *** error for object 0xa04da754: pointer being
freed was not allocated
*** set a breakpoint in malloc_error_break to debug
protoc-c(21659) malloc: *** error for object 0xa04da7c4: pointer being
freed was not allocated
*** set a breakpoint in malloc_error_break to debug
protoc-c(21660) malloc: *** error for object 0xa04da7c4: pointer being
freed was not allocated
*** set a breakpoint in malloc_error_break to debug
WARNING: All log messages before absl::InitializeLog() is called are
written to STDERR
W0000 00:00:1747676036.582584 2307 main.cc:45] `protoc-c` is deprecated.
Please use `protoc` instead!
WARNING: All log messages before absl::InitializeLog() is called are
written to STDERR
W0000 00:00:1747676036.582586 2307 main.cc:45] `protoc-c` is deprecated.
Please use `protoc` instead!
protoc-c(21660) malloc: *** error for object 0xef4828: pointer being freed
was not allocated
*** set a breakpoint in malloc_error_break to debug
protoc-c(21659) malloc: *** error for object 0xef4828: pointer being freed
was not allocated
*** set a breakpoint in malloc_error_break to debug
protoc-c(21659) malloc: *** error for object 0xef3e90: pointer being freed
was not allocated
*** set a breakpoint in malloc_error_break to debug
protoc-c(21660) malloc: *** error for object 0xef3e90: pointer being freed
was not allocated
*** set a breakpoint in malloc_error_break to debug
protoc-c(21659) malloc: *** error for object 0xef3df8: pointer being freed
was not allocated
*** set a breakpoint in malloc_error_break to debug
protoc-c(21660) malloc: *** error for object 0xef3df8: pointer being freed
was not allocated
*** set a breakpoint in malloc_error_break to debug
protoc-c(21659) malloc: *** error for object 0xef3e44: pointer being freed
was not allocated
*** set a breakpoint in malloc_error_break to debug
protoc-c(21660) malloc: *** error for object 0xef3e44: pointer being freed
was not allocated
*** set a breakpoint in malloc_error_break to debug
protoc-c(21659) malloc: *** error for object 0xef3d30: pointer being freed
was not allocated
*** set a breakpoint in malloc_error_break to debug
protoc-c(21660) malloc: *** error for object 0xef3d30: pointer being freed
was not allocated
*** set a breakpoint in malloc_error_break to debug
protoc-c(21659) malloc: *** error for object 0xef3c08: pointer being freed
was not allocated
*** set a breakpoint in malloc_error_break to debug
protoc-c(21660) malloc: *** error for object 0xef3c08: pointer being freed
was not allocated
*** set a breakpoint in malloc_error_break to debug
protoc-c(21659) malloc: *** error for object 0xef3b28: pointer being freed
was not allocated
*** set a breakpoint in malloc_error_break to debug
protoc-c(21660) malloc: *** error for object 0xef3b28: pointer being freed
was not allocated
*** set a breakpoint in malloc_error_break to debug
protoc-c(21659) malloc: *** error for object 0xef3b98: pointer being freed
was not allocated
*** set a breakpoint in malloc_error_break to debug
protoc-c(21659) malloc: *** error for object 0xef3a60: pointer being freed
was not allocated
*** set a breakpoint in malloc_error_break to debug
protoc-c(21659) malloc: *** error for object 0xef4768: pointer being freed
was not allocated
*** set a breakpoint in malloc_error_break to debug
protoc-c(21660) malloc: *** error for object 0xef3b98: pointer being freed
was not allocated
*** set a breakpoint in malloc_error_break to debug
protoc-c(21659) malloc: *** error for object 0xef48e8: pointer being freed
was not allocated
*** set a breakpoint in malloc_error_break to debug
protoc-c(21659) malloc: *** error for object 0xef48f4: pointer being freed
was not allocated
*** set a breakpoint in malloc_error_break to debug
protoc-c(21659) malloc: *** error for object 0xef4910: pointer being freed
was not allocated
*** set a breakpoint in malloc_error_break to debug
protoc-c(21660) malloc: *** error for object 0xef3a60: pointer being freed
was not allocated
*** set a breakpoint in malloc_error_break to debug
protoc-c(21660) malloc: *** error for object 0xef4768: pointer being freed
was not allocated
*** set a breakpoint in malloc_error_break to debug
protoc-c(21660) malloc: *** error for object 0xef48e8: pointer being freed
was not allocated
*** set a breakpoint in malloc_error_break to debug
protoc-c(21660) malloc: *** error for object 0xef48f4: pointer being freed
was not allocated
*** set a breakpoint in malloc_error_break to debug
protoc-c(21660) malloc: *** error for object 0xef4910: pointer being freed
was not allocated
*** set a breakpoint in malloc_error_break to debug
```
However, it seems to work regardless, as of now.
…On Mon, May 19, 2025 at 10:30 PM Suhail Khan ***@***.***> wrote:
*suhailskhan* left a comment (macports/macports-ports#28321)
<#28321 (comment)>
I am not sure I can make a strong call one way or another as I don’t have
enough insight, but from what limited insight I do have, they would
probably not need to stay for too much more time.
What I probably *do* have enough insight to say is that protobuf-cpp
(renamed to protobuf2-cpp in this PR) could be deleted as soon as today.
It has three dependents, two of which are its respective Java and Python
bindings, and the other is an obscure port that has been broken for some
time now. The Java bindings have no dependents, and the Python bindings
have one dependent: a very out-of-date port that does not consistently
build on all macOS versions. It appears that upstream does not even have a
Protobuf dependency anymore, so if it were to be updated then py-protobuf
would be completely unnecessary.
—
Reply to this email directly, view it on GitHub
<#28321 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AV6AXFWH46RREVGHVRAR7N327HTHPAVCNFSM6AAAAAB4KUHQZKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQOJRGI2TGNBQGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Closes: https://trac.macports.org/ticket/68059 Update Portfile
Co-Authored-By: Sergey Fedorov <vital.had@gmail.com>
I haven't forgotten about this, work has simply been super-busy this week. Worse-case, I'll try to make time this weekend. |
I finally had a chance to uninstall the various protobuf ports, grpc, etc, and reinstall the latest ones. There's still more to test, but so far, so good. One thing I noticed though: For the current dependents of py-protobuf3, have you tried using py-protobuf instead? That would allow us to eliminate that port, further simplifying things. Those ports are:
If we do have to keep both py-protobuf and py-protobuf3, you'll need to declare a conflict declaration against the peer port. (Since they both install into the same prefix.) |
My apologies for the confusion that attempting to deal with the size of these PRs has caused, but these ports have already been updated to use the new py-protobuf in separate PRs, again to avoid the checks from timing out had those updates been part of this PR.
|
I agree that we should get rid of py-protobuf3 altogether. I had initially begun by opting to make the least possible changes to it, and had not added a conflict declaration, until we determine whether or not this port should even stay. |
Sounds good, I completely forgot about the separate PRs. (It's been a very long two weeks at work.) I'll pull more of those down and test. But overall, it looks like we're getting close to being able to merge all of your great work! The only blocker, is our buildbot infrastructure: Presently, the builders are down, due to storms in Texas. So we'll want to wait until that is back up - and fully caught up - before merging. We don't have an ETA yet, but it could be anywhere from a few days, up to a week. In the interim, that gives me plenty of time to continue validating locally. And I'll continue to do that over the weekend. More to follow, but I'm very excited that we're almost there. And thank you again for all of the time you've put into this effort, as it will make a huge improvement to MacPorts as a whole! |
Description
This is a follow-up to #28098.
Work in progress; see comment below for description of what this PR is intended to do.
Cc @mascguy
Type(s)
Tested on
macOS 15.4.1 24E263 arm64
Xcode 16.3 16E140
Verification
Have you
port lint
?sudo port test
?sudo port -vst install
?[skip notification]